import express from 'express';

import UserController from '../controllers/user.js';
import TokenUtil from '../utils/TokenUtil.js';

const router = express.Router();

router.post('/register', UserController.createUser);
router.post('/login', UserController.login);
router.post('/update', UserController.update);

// 直接请求不分页，"/:userId/bindingList?page=1&pageSize=10" ,这样发请求分页
router.get('/:userId/bindingList',UserController.getBindingList)
router.post('/binding',UserController.binding)
router.post('/unbinding',UserController.unbinding)

export default router;
